Backout incautious public/io header changes
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 21 Oct 2005 19:58:39 +0000 (13:58 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 21 Oct 2005 19:58:39 +0000 (13:58 -0600)
xen/Rules.mk
xen/arch/ia64/Rules.mk
xen/include/public/io/ioreq.h
xen/include/public/io/vmx_vlapic.h

index a1ae2c31b53d25f19ffe788a0b57816327488820..d57ca65e5129c4faef9c29b3b2607e49de7227ce 100644 (file)
@@ -47,7 +47,6 @@ test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
 
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
-CFLAGS += -D__HYPERVISOR__
 ifneq ($(debug),y)
 CFLAGS += -DNDEBUG
 ifeq ($(verbose),y)
index 279761d893a2715ff7b205e10ae3e6aa29fe7451..8eb31cc674be949d378be8fea4d5dd4616ac126a 100644 (file)
@@ -24,7 +24,7 @@ CFLAGS  += -I$(BASEDIR)/include/asm-ia64 -I$(BASEDIR)/include/asm-ia64/linux \
           -I$(BASEDIR)/include/asm-ia64/linux-null                     \
            -I$(BASEDIR)/arch/ia64/linux -I$(BASEDIR)/arch/ia64/linux-xen
 CFLAGS  += -Wno-pointer-arith -Wredundant-decls
-CFLAGS  += -DIA64 -DXEN -DLINUX_2_6 -DV_IOSAPIC_READY
+CFLAGS  += -DIA64 -DXEN -DLINUX_2_6
 CFLAGS += -ffixed-r13 -mfixed-range=f12-f15,f32-f127
 CFLAGS += -w -g
 ifeq ($(VALIDATE_VT),y)
index 210810e6af5649f1886e7b7f4b411b89eb1e98ab..d502171bbfaa1562774b13a5af830bf29601059d 100644 (file)
 #define STATE_IORESP_READY      3
 #define STATE_IORESP_HOOK       4
 
-#define IOREQ_TYPE_PIO         0       /* pio */
-#define IOREQ_TYPE_COPY                1       /* mmio ops */
-#define IOREQ_TYPE_AND         2
-#define IOREQ_TYPE_OR          3
-#define IOREQ_TYPE_XOR         4
-
-#ifdef __HYPERVISOR__
-#include <public/io/vmx_vlapic.h>
-#else
-#include <xen/io/vmx_vlapic.h>
-#endif
-
+#define IOREQ_TYPE_PIO  0 /* pio */
+#define IOREQ_TYPE_COPY  1 /* mmio ops */
+#define IOREQ_TYPE_AND  2
+#define IOREQ_TYPE_OR  3
+#define IOREQ_TYPE_XOR  4
 
 /*
  * VMExit dispatcher should cooperate with instruction decoder to
  * virq 
  */
 typedef struct {
-    u64     addr;               /*  physical address            */
-    u64     size;               /*  size in bytes               */
-    u64     count;             /*  for rep prefixes            */
+    uint64_t addr;   /*  physical address            */
+    uint64_t size;   /*  size in bytes               */
+    uint64_t count;  /*  for rep prefixes            */
     union {
-        u64     data;           /*  data                        */
-        void    *pdata;         /*  pointer to data             */
+        uint64_t data;           /*  data                        */
+        void    *pdata;          /*  pointer to data             */
     } u;
-    u8      state:4;
-    u8      pdata_valid:1;     /* if 1, use pdata above        */
-    u8      dir:1;             /*  1=read, 0=write             */
-    u8      df:1;
-    u8      type;              /* I/O type                     */
+    uint8_t state:4;
+    uint8_t pdata_valid:1; /* if 1, use pdata above  */
+    uint8_t dir:1;   /*  1=read, 0=write             */
+    uint8_t df:1;
+    uint8_t type;    /* I/O type                     */
 } ioreq_t;
 
+#define MAX_VECTOR    256
+#define BITS_PER_BYTE   8
+#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(uint64_t)))
+
 typedef struct {
-    u64   pic_intr[INTR_LEN];
-    u64   pic_mask[INTR_LEN];
-    int     eport; /* Event channel port */
+    uint64_t pic_intr[INTR_LEN];
+    uint64_t pic_mask[INTR_LEN];
+    int      eport; /* Event channel port */
 } global_iodata_t;
 
 typedef struct {
-    ioreq_t         vp_ioreq;
-    vl_apic_info    apic_intr;
+    ioreq_t       vp_ioreq;
+    unsigned long vp_intr[INTR_LEN];
 } vcpu_iodata_t;
 
 typedef struct {
-    int vcpu_number;
-    global_iodata_t     sp_global;
-    vcpu_iodata_t       vcpu_iodata[1];
+    global_iodata_t sp_global;
+    vcpu_iodata_t   vcpu_iodata[1];
 } shared_iopage_t;
 
 #endif /* _IOREQ_H_ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
index c765bb0cc6da93badde6a7d55a46d44e2ef24a7a..5a8162b2e1d47c4582afeb4e3cacb2833f86457a 100644 (file)
@@ -1,29 +1,67 @@
 #ifndef _VMX_VLAPIC_H
 #define _VMX_VLAPIC_H
 
+/*
+   We extended one bit for PIC type
+ */
 #define VLAPIC_DELIV_MODE_FIXED          0x0
 #define VLAPIC_DELIV_MODE_LPRI           0x1
 #define VLAPIC_DELIV_MODE_SMI            0x2
-#define VLAPIC_DELIV_MODE_PMI            0x2
 #define VLAPIC_DELIV_MODE_NMI            0x4
 #define VLAPIC_DELIV_MODE_INIT           0x5
 #define VLAPIC_DELIV_MODE_STARTUP        0x6
 #define VLAPIC_DELIV_MODE_EXT            0x7
 #define VLAPIC_DELIV_MODE_MASK            0x8
 
-#define MAX_VECTOR    256
-#define BITS_PER_BYTE   8
-#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
-#define INTR_LEN_32        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u32)))
+#define VLAPIC_MSG_LEVEL                4
+
+#define INTR_EXT   0
+#define INTR_APIC   1
+#define INTR_LAPIC  2
+
+#define VL_STATE_EOI    1
+#define VL_STATE_EXT_LOCK   2
+#define VL_STATE_MSG_LOCK   3
+#define VL_STATE_EOI_LOCK   3
+
+#define VLOCAL_APIC_MAX_INTS             256
+#define VLAPIC_INT_COUNT                (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint64_t)))
+#define VLAPIC_INT_COUNT_32             (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint32_t)))
+
+struct vapic_bus_message{
+   uint8_t   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
+   uint8_t   level:1;        /* level or edge */
+   uint8_t   trig_mod:1;    /* assert or disassert */
+   uint8_t   reserved:2;
+   uint8_t   vector;
+};
 
 typedef struct {
-    u32   vl_lapic_id;
-    u32   vl_apr;
-    u32   vl_logical_dest;
-    u32   vl_dest_format;
-    u32   vl_arb_id;
-    u64   irr[INTR_LEN];
-    u64   tmr[INTR_LEN];
-}vl_apic_info;
+    /* interrupt for PIC and ext type IOAPIC interrupt */
+    uint64_t   vl_ext_intr[VLAPIC_INT_COUNT];
+    uint64_t   vl_ext_intr_mask[VLAPIC_INT_COUNT];
+    uint64_t   vl_apic_intr[VLAPIC_INT_COUNT];
+    uint64_t   vl_apic_tmr[VLAPIC_INT_COUNT];
+    uint64_t   vl_eoi[VLAPIC_INT_COUNT];
+    uint32_t   vl_lapic_id;
+    uint32_t   direct_intr;
+    uint32_t   vl_apr;
+    uint32_t   vl_logical_dest;
+    uint32_t   vl_dest_format;
+    uint32_t   vl_arb_id;
+    uint32_t   vl_state;
+    uint32_t   apic_msg_count;
+    struct vapic_bus_message  vl_apic_msg[24];
+} vlapic_info;
 
 #endif /* _VMX_VLAPIC_H_ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */